package com.lxb.myforum.domain


/**
 *
 * @author lxb
 */
data class PageResponse<T>(
        var code: Long = 0,
        var msg: String? = null,
        var totalCount: Long = 0,
        var totalPage: Long = 0,
        var page: Long = 0,
        var size: Long = 0,
        var first: Int = 0,
        var last: Int = 0,

        var rows: List<T>? = null
) {

//    constructor(code: Long, msg: String, totalCount: Long, rows: List<T>) : super() {
//        this.code = code
//        this.msg = msg
//        this.totalCount = totalCount
//        this.rows = rows
//    }

//    constructor(code: Long, msg: String, pageInfo: Page<T>) : this(code = code, msg = msg, pageInfo = pageInfo)
//    {
//        this.code = code
//        this.msg = msg
//        this.page = pageInfo.number.toLong()
//        this.size = pageInfo.size.toLong()
//        this.rows = pageInfo.content
//        this.totalCount = pageInfo.totalElements
//        this.totalPage = pageInfo.totalPages.toLong()
//    }
}
